package com.example.test;

import java.util.Date;

import android.content.Context;

import com.example.fmgidsprototype.data.DataManager;
import com.example.fmgidsprototype.webservice.n_cst_web_service_interface;

public class n_cst_start {
	private Context inv_context;
	private DataManager dm;
	
	public n_cst_start(Context anv_context, DataManager dm)
	{
		inv_context = anv_context;
		this.dm = dm;
	}

	public boolean of_get_categories_vanues(Date adt_modified_date)
	{
		// Create object for webservice access
		n_cst_web_service_interface lnv_ws = new n_cst_web_service_interface(inv_context);
		
		// Create object derived from the Interface I_CallBack 
		n_cst_category_venues lnv_category_venues = new n_cst_category_venues(dm);				
		
		// Retrieve the categories and venues from the webservice
		lnv_ws.of_get_categories(adt_modified_date, lnv_category_venues);
		return true;
	}
	
	public void of_get_revues_by_json_id(Date adt_modified_date)
	{
		// Create object for webservice access
		n_cst_web_service_interface lnv_ws = new n_cst_web_service_interface(inv_context);	
		
		// Create object derived from the Interface I_CallBack
		n_cst_reviews_of_venue lnv_reviews = new n_cst_reviews_of_venue();

		// Retrieve the reviews from specified JsonID (100 and 103 are foreseen)
		lnv_ws.of_get_reviews(adt_modified_date, lnv_reviews);
	}
}
